<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta http-equiv="Cache-Control" content="no-siteapp"/>
		<meta name="renderer" content="webkit" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
        <meta name="description" content="PlaneUI" />
        <meta name="keywords" content="PlaneUI" />
        <title>评价 / 评分 Rating - PlaneUI 组件示例</title>

        <link rel="icon" type="image/png" href="favicon.png" />
        <link rel="stylesheet" type="text/css" href="../../dist/css/planeui.css" />
	</head>
	<body>
        <title>Rating Examples - PlaneUI</title>
        <div class="pui-layout" style="width:96%;">
            <br/>
            <h4>评价 / 评分 Rating</h4>
            <p><small>兼容情况： 支持 IE8+</small></p><br/>
            <div class="pui-rating pui-rating-xsmall"></div>
            <div class="pui-rating pui-rating-xsmall" score="2.31" total="5" titles="非常差,很差,好,很好,非常好"></div>
            <div class="pui-rating pui-rating-small" score="3.01" total="5" titles="非常差,很差,好,很好,非常好" click-callback="testCallback"></div>
            <div class="pui-rating" score="2.31" total="5" titles="非常差,很差,好,很好,非常好"></div>
            <div class="pui-rating pui-rating-large" score="4.92" total="5" titles="非常差,很差,好,很好,非常好"></div>
            <div class="pui-rating pui-rating-xlarge" score="3.72" total="5" titles="非常差,很差,好,很好,非常好"></div>
        </div>

        <!--[if (gte IE 9) | !(IE)]><!-->
		<script type="text/javascript" src="./js/jquery-2.1.1.min.js"></script>
        <!--<![endif]-->

		<!--[if lt IE 9]>
		<script type="text/javascript" src="./js/jquery-1.11.3.min.js"></script>
		<script type="text/javascript" src="./../../dist/js/planeui.patch.ie8.js"></script>
		<![endif]-->

		<!--[if lt IE 10]>
		<script type="text/javascript" src="./../../dist/js/planeui.patch.ie9.js"></script>
		<![endif]-->
		<script type="text/javascript" src="./../../dist/js/planeui.js"></script>
        <script type="text/javascript">
                
            function testCallback(rating) {
                alert('testCallback');
            }
            
            $(function(){
                $(".pui-rating").rating({
                    total : 10,
                    score : 8.899,
                    ajaxURL : "//192.168.1.6/planeui/examples/components/php/rating.php",
                    /*clickHandler : function(pui-rating) {
                        alert("自定义的点击操作，用于自定义的数据操作，用于替换组件默认的方法");
                    },*/
                    clickCallback : function(rating) {
                        console.log("ajax返回结果后的执行的回调函数。", rating);
                    }
                });
            });
        </script>  
    </body>
    </html>